The Java™ programming language is a programming language designed for use in distributed environments such as the Internet. Java enforces an object-oriented programming model and can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network.
The increasing adaptation of Java to various computing tasks may be attributed to the portability of the language and the fact that Java is an object-oriented programming language. Portability is a name given to the characteristic of Java that allows a source program to be compiled into “bytecode” that can be run anywhere in a network on a server or client that has a Java “Virtual Machine”. It is then the task of the Java Virtual Machine to interpret the bytecode into code that will run on the computer hardware that is running the Java Virtual Machine. The object-oriented characteristic of Java allows a given object to take advantage of being part of a class of objects and to inherit code that is common to the class. Objects have associated methods. A method can be thought of as one of a set of capabilities or behaviors of a given object.
According to www.whatis.com, an information technology reference, in object-oriented programming and distributed object technology, a “component” is a reusable program building block that can be combined with other components in the same or other computers in a distributed network to form an application. Examples of a component include: a single button in a graphical user interface, a small interest calculator, an interface to a database manager. Components can be deployed on different servers in a network and communicate with each other for needed services. A component runs within a context called a container. Examples of containers include pages on a Web site, Web browsers, and word processors. In its JavaBeans™ application program interface for writing a component, Sun Microsystems calls a component a “Bean”. A JavaBean is simply the Sun Microsystems variation on the idea of a component.
Another component model is called an “Enterprise” JavaBean. Enterprise JavaBeans™ have qualities such as security, persistence, transaction capability, multithreading and scalability, among others. Hence, Enterprise JavaBeans have found extensive use in e-commerce applications where such qualities are particularly desirable.
Rapid software development is often impeded by the need to construct supporting software to facilitate testing. Unit-testing a complex Java object usually requires the construction of some kind of test application (test client). In the case of a specialized object, like an Enterprise JavaBean (EJB™), the application code required to facilitate testing can be somewhat complicated. Hand-written test applications can be quite inflexible in that they usually test a single scenario and, if something goes wrong, it can be hard to see where a problem has occurred. This is especially true with test applications that have no user interface because such test applications usually bind the test scenario at compile time. The result of a test case is usually reviewed using print statements to display the contents of a result object. If the test-case succeeds the programmer may need to change the test application and re-compile before testing a new scenario. If the test case fails, the programmer may have to add more print statements and re-compile before re-testing the scenario.
Enterprise JavaBean Test clients exist. However, typical Enterprise JavaBean test clients are dependent on a particular level of and type of Java runtime environment. Furthermore, such test clients are typically platform dependent and only work within a particular Java development environment. Other EJB test clients also need additional setup and configuration, based on the type of server, the EJB beans that will be tested, etc.